package com.greenyoung.pwiki.elasticsearch.search.entity;

import lombok.Data;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

@Data
public class Attachment {

    /**
     * 存储的全文内容
     */
    @Field(type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_smart")
    private String content;

    /**
     * 内容类型，由插件自动生成
     */
    @Field(name = "content_type", type = FieldType.Keyword)
    private String contentType;

    /**
     * 内容长度，由插件自动填充
     */
    @Field(name = "content_length", type = FieldType.Long)
    private Long contentLength;

}
